package net.xdclass.sqlsessionfactory;

import java.sql.Connection;

/**
 * @Classname ConnectionPoolManager
 * @Description TODO
 * @Date 2022/11/25 22:26
 * @Created by sunhao
 */
public class ConnectionPoolManager {
  private static DbBean dbBean = new DbBean();
  private static ConnectionPool connectionPool = new ConnectionPool(dbBean);
  private ConnectionPoolManager() {
  }

  public static Connection getConnectionPool() {
    return connectionPool.getConnection();
  }

  public static void closeConnection(Connection connection) {
    connectionPool.releaseConnection(connection);
  }

}
